package edu.hawaii.client;

import com.google.gwt.user.client.rpc.IsSerializable;

/**
 * A semester object that consists of the semester name and
 * its code.
 * @author Kiet Huynh
 *
 */
public class Semester implements IsSerializable {

  private String semesterText;
  private int semesterKey;
  
  /**
   * Sets the semester text such as "Spring 2007".
   * @param newSemesterText The new name for the semester.
   */
  public void setSemesterText(String newSemesterText) {
    this.semesterText = newSemesterText;
  }
  
  /**
   * Returns the semester text such as "Spring 2007".
   * @return The name of the semester.
   */
  public String getSemesterText() {
    return this.semesterText;
  }
  
  /**
   * Sets the semester key such as "200730" for Spring 2007.
   * @param newSemesterKey The new code for the semester.
   */
  public void setSemesterKey(int newSemesterKey) {
    this.semesterKey = newSemesterKey;
  }
  
  /**
   * Returns the semester key such as "200730" for Spring 2007.
   * @return The code of the semester.
   */
  public int getSemesterKey() {
    return this.semesterKey;
  }
}
